package org.battery.service;

import org.battery.entity.Produce;
import org.battery.entity.Page;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;


/**
 * Created by 1t on 2017-08-16.
 */
@Service("produceService")
public class ProduceService extends BaseService{

    public List<Produce> getProduce(Produce produce, Page page) throws Exception {
        Map<String, Object> map = new HashMap<String, Object>();
        map.put("info", produce);
        map.put("page", page);
        return (List<Produce>) this.getDaoSupport().findForList("T_Produce.getProducePage", map);
    }

    public List<Produce> getProduceTime() throws Exception {
        return (List<Produce>) this.getDaoSupport().findForList("T_Produce.getProduceTime");
    }

    public List<Produce> getProduceDay(Produce produce) throws Exception {
        return (List<Produce>) this.getDaoSupport().findForList("T_Produce.getProduceDay", produce);
    }

    public List<Produce> getProduceName(Produce produce) throws Exception {
        return (List<Produce>) this.getDaoSupport().findForList("T_Produce.getProduceName", produce);
    }

}
